package com.smedi.ismedi.progress.core.application.query.Impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.core.application.command.EngineeringReportDetailQuery;
import com.smedi.ismedi.progress.core.application.command.EngineeringReportOneQuery;
import com.smedi.ismedi.progress.core.application.command.EngineeringReportQuery;
import com.smedi.ismedi.progress.core.application.command.EngineeringWeekMonthReportSave;
import com.smedi.ismedi.progress.core.application.query.EngineeringrReportService;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.EngineeringReportDetail;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.EngineeringWeekMonthReport;
import com.smedi.ismedi.progress.core.domain.repository.EngineeringrReportRepository;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.EngineeringWeekMonthReportEntity;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * 施工日志查询实现
 *
 * @author liaojiajie
 * @date 2022/09/16
 */
@Service
@AllArgsConstructor
public class EngineeringrReportServiceImpl implements EngineeringrReportService {

    private final EngineeringrReportRepository engineeringrReportRepository;

    @Override
    public Boolean engineeringMonthReportCreateTask() {
        return engineeringrReportRepository.engineeringMonthReportCreateTask();
    }

    @Override
    public Page<EngineeringWeekMonthReport> getEngineeringReportListPC(EngineeringReportQuery engineeringReportQuery,String messageNotifyProjectEpcManagerRole,String messageNotifyProjectManagerRole) {
        return engineeringrReportRepository.getEngineeringReportListPC(engineeringReportQuery,messageNotifyProjectEpcManagerRole,messageNotifyProjectManagerRole);
    }

    @Override
    public Page<EngineeringWeekMonthReport> getEngineeringReportListAPP(EngineeringReportQuery engineeringReportQuery, String messageNotifyProjectEpcManagerRole) {
        return engineeringrReportRepository.getEngineeringReportListAPP(engineeringReportQuery,messageNotifyProjectEpcManagerRole);
    }

    @Override
    public Boolean engineeringWeekReportCreateTask() {
        return engineeringrReportRepository.engineeringWeekReportCreateTask();
    }

    @Override
    public EngineeringReportOneQuery getEngineeringrReportOne(EngineeringReportOneQuery engineeringReportOneQuery) {
        return engineeringrReportRepository.getEngineeringrReportOne(engineeringReportOneQuery);
    }

    @Override
    public void updateEngineeringrReport(EngineeringReportOneQuery engineerReport) {
        engineeringrReportRepository.updateEngineeringrReport(engineerReport);
    }

    @Override
    public EngineeringWeekMonthReportSave engineeringWeekMonthSaveAndDraft(EngineeringWeekMonthReportSave engineeringSaveAndDraft) {
        return engineeringrReportRepository.engineeringWeekMonthSaveAndDraft(engineeringSaveAndDraft);
    }

    @Override
    public Integer findWeekReport(LocalDate localDate, int weekType, Long projectId, Long id, int weekMonthReleaseStatus) {
        return engineeringrReportRepository.findWeekReport(localDate,weekType,projectId,id,weekMonthReleaseStatus);
    }

    @Override
    public Integer findMonthReport(LocalDate localDate, int monthType, Long projectId, int weekMonthReleaseStatus) {
        return engineeringrReportRepository.findMonthReport(localDate,projectId,monthType,weekMonthReleaseStatus);
    }

    @Override
    public List<EngineeringWeekMonthReportEntity> selectAllNoty(LocalDate localDate, int weekType, int weekMonthReleaseStatus) {
        return engineeringrReportRepository.selectAllNoty(localDate,weekType,weekMonthReleaseStatus);
    }

    @Override
    public EngineeringReportDetail getEngineeringReportDetail(EngineeringReportDetailQuery engineeringReportDetailQuery) {
        return engineeringrReportRepository.getEngineeringReportDetail(engineeringReportDetailQuery);
    }
}
